home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / clang / gnumake.zip / MAKEFILE.IN < prev    next >
Text File  |  1994-05-21  |  11KB  |  312 lines

  1. # NOTE: If you have no `make' program at all to process this makefile, run
  2. # `build.sh' instead.
  3. #
  4. # Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5. # This file is part of GNU Make.
  6. # GNU Make is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # GNU Make is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with GNU Make; see the file COPYING.  If not, write to
  17. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #
  20. #    Makefile for GNU Make
  21. #
  22.  
  23. # Ultrix 2.2 make doesn't expand the value of VPATH.
  24. VPATH = @srcdir@
  25. # This must repeat the value, because configure will remove `VPATH = .'.
  26. srcdir = @srcdir@
  27.  
  28. CC = @CC@
  29.  
  30. CFLAGS = @CFLAGS@
  31. LDFLAGS = @LDFLAGS@
  32.  
  33. # How to invoke ranlib.  This is only used by the `glob' subdirectory.
  34. RANLIB = @RANLIB@
  35.  
  36. # Define these for your system as follows:
  37. #    -DNO_ARCHIVES        To disable `ar' archive support.
  38. #    -DNO_FLOAT        To avoid using floating-point numbers.
  39. #    -DENUM_BITFIELDS    If the compiler isn't GCC but groks enum foo:2.
  40. #                Some compilers apparently accept this
  41. #                without complaint but produce losing code,
  42. #                so beware.
  43. # NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
  44. # See also `config.h'.
  45. defines = @DEFS@ -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
  46.  
  47. # Which flavor of remote job execution support to use.
  48. # The code is found in `remote-$(REMOTE).c'.
  49. REMOTE = @REMOTE@
  50.  
  51. # If you are using the GNU C library, or have the GNU getopt functions in
  52. # your C library, you can comment these out.
  53. GETOPT = getopt.o getopt1.o
  54. GETOPT_SRC = $(srcdir)/getopt.c $(srcdir)/getopt1.c $(srcdir)/getopt.h
  55.  
  56. # If you are using the GNU C library, or have the GNU glob functions in
  57. # your C library, you can comment this out.  GNU make uses special hooks
  58. # into the glob functions to be more efficient (by using make's directory
  59. # cache for globbing), so you must use the GNU functions even if your
  60. # system's C library has the 1003.2 glob functions already.  Also, the glob
  61. # functions in the AIX and HPUX C libraries are said to be buggy.
  62. GLOB = glob/libglob.a
  63.  
  64. # If your system doesn't have alloca, or the one provided is bad, define this.
  65. ALLOCA = @ALLOCA@
  66. ALLOCA_SRC = $(srcdir)/alloca.c
  67.  
  68. # If your system needs extra libraries loaded in, define them here.
  69. # System V probably need -lPW for alloca.  HP-UX 7.0's alloca in
  70. # libPW.a is broken on HP9000s300 and HP9000s400 machines.  Use
  71. # alloca.c instead on those machines.
  72. LOADLIBES = @LIBS@
  73.  
  74. # Any extra object files your system needs.
  75. extras = @LIBOBJS@
  76.  
  77. # Common prefix for machine-independent installed files.
  78. prefix = /usr/local
  79. # Common prefix for machine-dependent installed files.
  80. exec_prefix = $(prefix)
  81.  
  82. # Directory to install `make' in.
  83. bindir = $(exec_prefix)/bin
  84. # Directory to find libraries in for `-lXXX'.
  85. libdir = $(exec_prefix)/lib
  86. # Directory to search by default for included makefiles.
  87. includedir = $(prefix)/include
  88. # Directory to install the Info files in.
  89. infodir = $(prefix)/info
  90. # Directory to install the man page in.
  91. mandir = $(prefix)/man/man$(manext)
  92. # Number to put on the man page filename.
  93. manext = 1
  94. # Prefix to put on installed `make' binary file name.
  95. binprefix =
  96. # Prefix to put on installed `make' man page file name.
  97. manprefix = $(binprefix)
  98.  
  99. # Whether or not make needs to be installed setgid.
  100. # The value should be either `true' or `false'.
  101. # On many systems, the getloadavg function (used to implement the `-l'
  102. # switch) will not work unless make is installed setgid kmem.
  103. install_setgid = @NEED_SETGID@
  104. # Install make setgid to this group so it can read /dev/kmem.
  105. group = @KMEM_GROUP@
  106.  
  107. # Program to install `make'.
  108. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  109. # Program to install the man page.
  110. INSTALL_DATA = @INSTALL_DATA@
  111. # Generic install program.
  112. INSTALL = @INSTALL@
  113.  
  114. # Program to format Texinfo source into Info files.
  115. MAKEINFO = makeinfo
  116. # Program to format Texinfo source into DVI files.
  117. TEXI2DVI = texi2dvi
  118.  
  119. # Programs to make tags files.
  120. ETAGS = etags -tw
  121. CTAGS = ctags -tw
  122.  
  123. objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o    \
  124.        rule.o implicit.o default.o variable.o expand.o function.o    \
  125.        vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o    \
  126.        $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
  127. srcs = $(srcdir)/commands.c $(srcdir)/job.c $(srcdir)/dir.c        \
  128.        $(srcdir)/file.c $(srcdir)/getloadavg.c $(srcdir)/misc.c        \
  129.        $(srcdir)/main.c $(srcdir)/read.c $(srcdir)/remake.c        \
  130.        $(srcdir)/rule.c $(srcdir)/implicit.c $(srcdir)/default.c    \
  131.        $(srcdir)/variable.c $(srcdir)/expand.c $(srcdir)/function.c    \
  132.        $(srcdir)/vpath.c $(srcdir)/version.c                \
  133.        $(srcdir)/remote-$(REMOTE).c                    \
  134.        $(srcdir)/ar.c $(srcdir)/arscan.c                \
  135.        $(srcdir)/signame.c $(srcdir)/signame.h $(GETOPT_SRC)        \
  136.        $(srcdir)/commands.h $(srcdir)/dep.h $(srcdir)/file.h        \
  137.        $(srcdir)/job.h $(srcdir)/make.h $(srcdir)/rule.h        \
  138.        $(srcdir)/variable.h $(ALLOCA_SRC) $(srcdir)/config.h.in
  139.  
  140.  
  141. .SUFFIXES:
  142. .SUFFIXES: .o .c .h .ps .dvi .info .texinfo
  143.  
  144. all: make
  145. check: # No tests.
  146. info: make.info
  147. dvi: make.dvi
  148. # Some makes apparently use .PHONY as the default goal is it is before `all'.
  149. .PHONY: all check info dvi
  150.  
  151. make.info: make.texinfo
  152.     $(MAKEINFO) -I$(srcdir) $(srcdir)/make.texinfo -o make.info
  153.  
  154. make.dvi: make.texinfo
  155.     $(TEXI2DVI) $(srcdir)/make.texinfo
  156.  
  157. make.ps: make.dvi
  158.     dvi2ps make.dvi > make.ps
  159.  
  160. make: $(objs)
  161.     $(CC) $(LDFLAGS) $(objs) $(LOADLIBES) -o make.new
  162.     mv -f make.new make
  163.  
  164. # -I. is needed to find config.h in the build directory.
  165. .c.o:
  166.     $(CC) $(defines) -c -I. -I$(srcdir) -I$(srcdir)/glob \
  167.           $(CFLAGS) $< $(OUTPUT_OPTION)
  168.  
  169. # For some losing Unix makes.
  170. SHELL = /bin/sh
  171. @SET_MAKE@
  172.  
  173. glob/libglob.a: FORCE config.h
  174.     cd glob; $(MAKE) CC='$(CC)' CFLAGS='$(CFLAGS) -I..' \
  175.              CPPFLAGS='$(CPPFLAGS) -DHAVE_CONFIG_H' \
  176.              RANLIB='$(RANLIB)' \
  177.              libglob.a
  178. FORCE:
  179.  
  180. tagsrcs = $(srcs) $(srcdir)/remote-*.c
  181. TAGS: $(tagsrcs)
  182.     $(ETAGS) $(tagsrcs)
  183. tags: $(tagsrcs)
  184.     $(CTAGS) $(tagsrcs)
  185.  
  186. .PHONY: install installdirs
  187. install: installdirs \
  188.      $(bindir)/$(binprefix)make $(infodir)/make.info \
  189.      $(mandir)/$(manprefix)make.$(manext)
  190.  
  191. installdirs:
  192.     $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(mandir)
  193.  
  194. $(bindir)/$(binprefix)make: make
  195.     $(INSTALL_PROGRAM) make $@.new
  196.     @if $(install_setgid); then \
  197.        if chgrp $(group) $@.new && chmod g+s $@.new; then \
  198.          echo "chgrp $(group) $@.new && chmod g+s $@.new"; \
  199.        else \
  200.          echo "$@ needs to be owned by group $(group) and setgid;"; \
  201.          echo "otherwise the \`-l' option will probably not work."; \
  202.          echo "You may need special priveleges to install $@."; \
  203.        fi; \
  204.      else true; fi
  205. # Some systems can't deal with renaming onto a running binary.
  206.     -rm -f $@.old
  207.     -mv $@ $@.old
  208.     mv $@.new $@
  209.  
  210. $(infodir)/make.info: make.info
  211.     if [ -r ./make.info ]; then dir=.; else dir=$(srcdir); fi; \
  212.     for file in $${dir}/make.info*; do \
  213.       name="`basename $$file`"; \
  214.       $(INSTALL_DATA) $$file \
  215.         `echo $@ | sed "s,make.info\$$,$$name,"`; \
  216.     done
  217. # Run install-info only if it exists.
  218. # Use `if' instead of just prepending `-' to the
  219. # line so we notice real errors from install-info.
  220. # We use `$(SHELL) -c' because some shells do not
  221. # fail gracefully when there is an unknown command.
  222.     if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
  223.       install-info --infodir=$(infodir) $$dir/make.info; \
  224.     else true; fi
  225.  
  226. $(mandir)/$(manprefix)make.$(manext): make.man
  227.     $(INSTALL_DATA) $(srcdir)/make.man $@
  228.  
  229.  
  230. loadavg: loadavg.c config.h
  231.     $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \
  232.           loadavg.c $(LOADLIBES) -o $@
  233. # We copy getloadavg.c into a different file rather than compiling it
  234. # directly because some compilers clobber getloadavg.o in the process.
  235. loadavg.c: getloadavg.c
  236.     ln $(srcdir)/getloadavg.c loadavg.c || \
  237.     cp $(srcdir)/getloadavg.c loadavg.c
  238. check-loadavg: loadavg
  239.     @echo The system uptime program believes the load average to be:
  240.     -uptime
  241.     @echo The GNU load average checking code believes:
  242.     ./loadavg
  243. check: check-loadavg
  244.  
  245.  
  246. .PHONY: clean realclean distclean mostlyclean
  247. clean: glob-clean
  248.     -rm -f make loadavg *.o core make.info* make.dvi
  249. distclean: clean glob-realclean
  250.     -rm -f Makefile config.h config.status build.sh stamp-config
  251.     -rm -f TAGS tags
  252.     -rm -f make.?? make.??s make.log make.toc make.*aux
  253.     -rm -f loadavg.c
  254. realclean: distclean
  255. mostlyclean: clean
  256.  
  257. .PHONY: glob-clean glob-realclean
  258. glob-clean glob-realclean:
  259.     cd glob; $(MAKE) $@
  260.  
  261. Makefile: config.status $(srcdir)/Makefile.in
  262.     $(SHELL) config.status
  263. glob/Makefile: config.status $(srcdir)/glob/Makefile.in
  264.     $(SHELL) config.status
  265. config.h: stamp-config ;
  266. stamp-config: config.status $(srcdir)/config.h.in
  267.     $(SHELL) config.status
  268.     touch stamp-config
  269.  
  270. # These rules cause too much trouble.
  271. #configure: configure.in
  272. #    autoconf $(ACFLAGS)
  273. #config.h.in: configure.in
  274. #    autoheader $(ACFLAGS)
  275.  
  276. # This tells versions [3.59,3.63) of GNU make not to export all variables.
  277. .NOEXPORT:
  278.  
  279. # The automatically generated dependencies below may omit config.h
  280. # because it is included with ``#include <config.h>'' rather than
  281. # ``#include "config.h"''.  So we add the explicit dependency to make sure.
  282. $(objs): config.h
  283.  
  284. # Automatically generated dependencies will be put at the end of the file.
  285.  
  286. # Automatically generated dependencies.
  287. commands.o : commands.c make.h dep.h commands.h file.h variable.h job.h 
  288. job.o : job.c make.h commands.h job.h file.h variable.h 
  289. dir.o : dir.c make.h config.h 
  290. file.o : file.c make.h commands.h dep.h file.h variable.h 
  291. misc.o : misc.c make.h dep.h 
  292. main.o : main.c make.h commands.h dep.h file.h variable.h job.h getopt.h 
  293. read.o : read.c make.h commands.h dep.h file.h variable.h glob/glob.h 
  294. remake.o : remake.c make.h commands.h job.h dep.h file.h 
  295. rule.o : rule.c make.h config.h commands.h dep.h file.h variable.h rule.h 
  296. implicit.o : implicit.c make.h rule.h dep.h file.h 
  297. default.o : default.c make.h rule.h dep.h file.h commands.h variable.h 
  298. variable.o : variable.c make.h commands.h variable.h dep.h file.h 
  299. expand.o : expand.c make.h config.h commands.h file.h variable.h 
  300. function.o : function.c make.h variable.h dep.h commands.h job.h 
  301. vpath.o : vpath.c make.h file.h variable.h 
  302. version.o : version.c 
  303. ar.o : ar.c make.h file.h dep.h 
  304. arscan.o : arscan.c make.h 
  305. signame.o : signame.c config.h signame.h 
  306. remote-stub.o : remote-stub.c make.h commands.h 
  307. getopt.o : getopt.c config.h getopt.h 
  308. getopt1.o : getopt1.c config.h getopt.h 
  309. getloadavg.o : getloadavg.c config.h 
  310.